package com.atguigu.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.ProductAttrValueEntity;

import java.util.List;
import java.util.Map;

/**
 * spu属性值
 *
 * @author DuGuanghan
 * @since 2024-03-15 10:45:19
 */
public interface ProductAttrValueService extends IService<ProductAttrValueEntity> {

    /**
     * 分页查询
     *
     * @param params 参数
     * @return {@link PageUtils }
     * @author DuGuanghan
     * @since 2024-03-15 10:45:00
     */
    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取spu规格
     *
     * @param spuId SPU ID
     * @return {@link List }<{@link ProductAttrValueEntity }>
     * @author DuGuanghan
     * @since 2024-03-15 10:44:49
     */
    List<ProductAttrValueEntity> querySpuBaseAttr(Long spuId);

    /**
     * 修改商品规格
     *
     * @param spuId SPU ID
     * @param list  商品属性值
     * @author DuGuanghan
     * @since 2024-03-15 10:49:54
     */
    void updateBySpuId(Long spuId, List<ProductAttrValueEntity> list);
}

